package com.share.bean.oa.org;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * <p>Title：OA-员工（身份证、社保号、银行账号）</p>
 * <p>Description：</p>
 * @Author：杨浩泉
 * @Date：2010-4-27
 */
@Entity
@Table(name="share_oa_empCard")
public class EmpCard {

	private int id ;
	
	/** 身份证 */
	private String cardNo ;
	
	/** 社保号 */
	private String socialNo ;
	
	/** 银行账号 */
	private String bankNo ;
	
	/** 员工卡号与员工信息一对一关系，维护端为员工 */
	private Employee employee ;

	@Id @GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getSocialNo() {
		return socialNo;
	}

	public void setSocialNo(String socialNo) {
		this.socialNo = socialNo;
	}

	public String getBankNo() {
		return bankNo;
	}

	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}

	@OneToOne(mappedBy="empCard",cascade=CascadeType.REFRESH)
	@JoinColumn(name="card_id",unique=true)
	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	
	
}
